#include <iostream>
#include <vector>

int main()
{
    int l, w, k, p;
    std::cin >> l >> w >> k >> p;

    std::vector<std::vector<int>> p_vec;
    for (int i = 0; i < l; i++)
    {
        std::vector<int> p_tmp;
        for (int j = 0; j < w; j++)
        {
            int tmp;
            std::cin >> tmp;
            p_tmp.push_back(tmp);
        }
        p_vec.push_back(p_tmp);
    }

    std::vector<std::vector<int>> p_pre(l + 1, std::vector<int>(w + 1, 0));
    for (int i = 0; i < l; i++)
    {
        for (int j = 0; j < w; j++)
        {
            p_pre[i + 1][j + 1] = p_vec[i][j] + p_pre[i + 1][j] + p_pre[i][j + 1] - p_pre[i][j];
        }
    }

    int cnt = 0;
    for (int i = k; i <= l; i++)
    {
        for (int j = k; j <= w; j++)
        {
            int sm = p_pre[i][j] - p_pre[i - k][j] - p_pre[i][j - k] + p_pre[i - k][j - k];
            if (sm >= p)
                cnt++;
        }
    }

    std::cout << cnt << std::endl;

    return 0;
}